<template>
  <router-view v-slot="{ Component }">
    <transition name="fade" mode="out-in">
      <component :is="Component" />
    </transition>
  </router-view>
</template>

<script setup>
// No setup logic needed
</script>

<style>
/* 导入Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  color: #303133;
  background-color: #f5f7fa;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
  color: #409EFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #66b1ff;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #909399;
}

/* 页面过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* Element Plus 样式覆盖 */
.el-button {
  font-weight: 500 !important;
}

.el-button--primary:not(.is-plain) {
  background-color: #409EFF !important;
}

.el-button--primary.is-plain {
  color: #409EFF !important;
  border-color: #d9ecff !important;
  background-color: #ecf5ff !important;
}

/* 响应式基础 */
@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }
}
</style>